import mysql.connector

# 连接数据库
conn = mysql.connector.connect(
    host='localhost',
    user='root',
    password='1472580369',
    database='medical_literature_system'
)

cursor = conn.cursor()

# 查询用户信息
cursor.execute("SELECT id, username, password FROM sys_user")
results = cursor.fetchall()

print("所有用户信息:")
for row in results:
    print(f"ID: {row[0]}, 用户名: {row[1]}, 密码: {row[2]}")

cursor.close()
conn.close()